#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project : python的学习
@File    : 流程控制.py
@IDE     : PyCharm
@Author  : 春风十里
@Date    : 2023/6/13 11:53

'''
# 流程控制
a = 10
b = 20
if a < b:
    print("真的")
if a > b:
    print("假的")
a = 10
b = 20
if a > b:
    a = 30
    print(a)
else:
    print(111)
s = int(input("请输入分数:"))
if 80 >= s >= 60:
    print("及格")
elif 80 < s <= 90:
    print("优秀")
elif 90 < s <= 100:
    print("非常优秀")
else:
    print("不及格")
    if s > 50:
        print("你的分数在60左右")
    else:
        print("你的分数低于50分")
# 循环流程
a = 3
while a < 5:
    s = int(input("请输入分数:"))
    if 80 >= s >= 60:
        print("及格")
    elif 80 < s <= 90:
        print("优秀")
    elif 90 < s <= 100:
        print("非常优秀")
    else:
        print("不及格")
        if s > 50:
            print("你的分数在60左右")
        else:
            print("你的分数低于50分")
    a += 1
print(a)
print("while执行结束了")
# 请输入一个整数，并计算各个位和
n = int(input("请输入一个整数:"))
# sums累加器： m = 10 m = 10+5
sums = 0
while n != 0:  # 32 #3
    sums = sums + n % 10  # sums = 1+2=3+3=6
    n = n // 10  # 32
print(sums)
l = [3, 2, 1]
for n in l:
    print("1")
for i in range(8):
    print(i)
print("--------------")
for i in range(10, 2, -2):
    print(i)
for i in range(1, 10):
    if i == 5:
        continue
    print(i)


